<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>index</title>
</head>
<body>

<%
    // 从Session中获取用户信息
    Object user = session.getAttribute("user");
    // 如果user==null，说明用户尚未登录，引导到login.jsp登录
    if (user == null) {
        response.sendRedirect(request.getContextPath() + "/login.jsp");
        return;
    }

%>

</body>
</html>